package com.ccp.dev.workflow.model.bpm;

import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * ClassDescribe:
 * 对象功能:流程批量审批定义设置 Model对象
 * @author :wangcheng
 * Date: 2019-10-08
 */
public class BpmBatchApproval extends BaseModel<BpmBatchApproval> {
    public static final String IS_SHOW_Y = "1";
    /**
     * 主键
     */
    protected String id;
    /**
     * 流程定义key
     */
    protected String modelKey;
    /**
     * 节点ID
     */
    protected String  nodeId;
    /**
     * 自定义表ID
     */
    protected String  tableId;
    /**
     * 字段设置
     */
    protected String  fieldJson;
    /**
     * 流程标题
     */
    protected String subject;
    /**
     * 节点名称
     */
    protected String nodeName;
    /**
     * 审批数量
     */
    protected Integer count;

    public void setId(String id){
        this.id = id;
    }
    /**
     * 返回 主键
     * @return
     */
    public String getId() {
        return this.id;
    }

    public String getModelKey() {
        return modelKey;
    }

    public void setModelKey(String modelKey) {
        this.modelKey = modelKey;
    }

    public void setNodeId(String nodeId){
        this.nodeId = nodeId;
    }
    /**
     * 返回 节点ID
     * @return
     */
    public String getNodeId() {
        return this.nodeId;
    }
    public void setTableId(String tableId){
        this.tableId = tableId;
    }
    /**
     * 返回 自定义表ID
     * @return
     */
    public String getTableId() {
        return this.tableId;
    }
    public void setFieldJson(String fieldJson){
        this.fieldJson = fieldJson;
    }

    /**
     * 返回 字段设置
     *
     * @return
     */
    public String getFieldJson() {
        return this.fieldJson;
    }

    public String getSubject() {
        return subject;
    }
    public void setSubject(String subject) {
        this.subject = subject;
    }
    public String getNodeName() {
        return nodeName;
    }
    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public Integer getCount() {
        return count;
    }
    public void setCount(Integer count) {
        this.count = count;
    }

    /**
     * @see java.lang.Object#equals(Object)
     */
    @Override
    public boolean equals(Object object)
    {
        if (!(object instanceof BpmBatchApproval))
        {
            return false;
        }
        BpmBatchApproval rhs = (BpmBatchApproval) object;
        return new EqualsBuilder()
                .append(this.id, rhs.id)
                .append(this.modelKey, rhs.modelKey)
                .append(this.nodeId, rhs.nodeId)
                .append(this.tableId, rhs.tableId)
                .append(this.fieldJson, rhs.fieldJson)
                .isEquals();
    }

    /**
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode()
    {
        return new HashCodeBuilder(-82280557, -700257973)
                .append(this.id)
                .append(this.modelKey)
                .append(this.nodeId)
                .append(this.tableId)
                .append(this.fieldJson)
                .toHashCode();
    }

    /**
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString()
    {
        return new ToStringBuilder(this)
                .append("id", this.id)
                .append("modelKey", this.modelKey)
                .append("nodeId", this.nodeId)
                .append("tableId", this.tableId)
                .append("fieldJson", this.fieldJson)
                .toString();
    }



}
